<?php

namespace app\api\validate;

use think\Validate;
use think\Db;

/**
 * Class Order
 * @package app\reserve\validate
 * @author zhenHong~
 * 订单验证器
 */
class Order extends Validate
{
    protected $rule = [
        'd_id' => 'require',
        'u_id' => 'require',
        'pay_type' => 'require|in:1,2,3,4'
    ];

    protected $message = [
        'd_id' => '请指定洗车的设备',
        'pay_type' => '请指定合法的支付类型',
        'u_id' => '未获取到下单的用户'
    ];

    protected $scene = [
        //  生成订单
        'createMyOrder' => ['d_id','u_id', 'pay_type']
    ];

}